import Vue from "vue";
import VueRouter from "vue-router";

// 引入组件
import main from "./component/main.vue";
import personal from "./component/contents/personal.vue";

// 要告诉 vue 使用 vueRouter
Vue.use(VueRouter);

const routes = [
    {
        path:"/main",
        component: main
    },
    {
        path: "/personal",
        component: personal
    },
    // 重定向
    {
        path: '/',
        redirect: '/main'
    }
]

var router =  new VueRouter({
    routes
})
export default router;